/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Abner Bastarrachea
 */
@Entity
@Table(name = "type_article")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TypeArticle.findAll", query = "SELECT t FROM TypeArticle t"),
    @NamedQuery(name = "TypeArticle.findByPkTypeArticle", query = "SELECT t FROM TypeArticle t WHERE t.pkTypeArticle = :pkTypeArticle"),
    @NamedQuery(name = "TypeArticle.findByDescription", query = "SELECT t FROM TypeArticle t WHERE t.description = :description"),
    @NamedQuery(name = "TypeArticle.findByStatusRegister", query = "SELECT t FROM TypeArticle t WHERE t.statusRegister = :statusRegister")})
public class TypeArticle implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "pkTypeArticle")
    private Short pkTypeArticle;
    @Basic(optional = false)
    @Column(name = "description")
    private String description;
    @Basic(optional = false)
    @Column(name = "statusRegister")
    private short statusRegister;

    public TypeArticle() {
    }

    public TypeArticle(Short pkTypeArticle) {
        this.pkTypeArticle = pkTypeArticle;
    }

    public TypeArticle(Short pkTypeArticle, String description, short statusRegister) {
        this.pkTypeArticle = pkTypeArticle;
        this.description = description;
        this.statusRegister = statusRegister;
    }

    public Short getPkTypeArticle() {
        return pkTypeArticle;
    }

    public void setPkTypeArticle(Short pkTypeArticle) {
        this.pkTypeArticle = pkTypeArticle;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public short getStatusRegister() {
        return statusRegister;
    }

    public void setStatusRegister(short statusRegister) {
        this.statusRegister = statusRegister;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pkTypeArticle != null ? pkTypeArticle.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TypeArticle)) {
            return false;
        }
        TypeArticle other = (TypeArticle) object;
        if ((this.pkTypeArticle == null && other.pkTypeArticle != null) || (this.pkTypeArticle != null && !this.pkTypeArticle.equals(other.pkTypeArticle))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.entidad.TypeArticle[ pkTypeArticle=" + pkTypeArticle + " ]";
    }
    
}
